package Demo1;

public class TestDemo1 {
    public static void eatFunc(Animal animal){
        animal.eat();
    }
    public static void flyFunc(IFly fly){
        fly.fly();
    }
    public static void runningFunc(IRunning run){
        run.running();
    }

    public static void main(String[] args) {
        eatFunc(new Dog("中华田园犬",2));
        eatFunc(new Cat("橘猫",3));

        flyFunc(new Duk("唐老鸭",5));
        runningFunc(new Cat("加菲猫",6));
        runningFunc(new Dog("哈士奇",3));
    }
}
